package com.springboot.cloud.demos.feign.service;

import com.springboot.cloud.common.core.entity.vo.Result;
import com.springboot.cloud.demos.entity.form.ProfitRecordForm;
import com.springboot.cloud.demos.entity.form.ProfitRecordQueryForm;
import com.springboot.cloud.demos.entity.form.UserForm;
import com.springboot.cloud.demos.entity.param.ProfitRecordQueryParam;
import com.springboot.cloud.demos.entity.po.ProfitRecord;
import com.springboot.cloud.demos.entity.po.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(name = "ribbon-consumer", fallback = ProfitRecordServiceFallback.class)
public interface ProfitRecordService {

    @RequestMapping(value = "/profitRecord/list", method = RequestMethod.POST)
    Result list(@RequestBody ProfitRecordQueryForm profitRecordQueryForm);

    @RequestMapping(value = "/profitRecord", method = RequestMethod.POST)
    Result<ProfitRecord> save(@RequestBody ProfitRecordForm form);

    @RequestMapping(value = "/profitRecord", method = RequestMethod.PUT)
    Result update(@RequestBody ProfitRecordForm form);

    @RequestMapping(value = "/profitRecord/{id}", method = RequestMethod.GET)
    Result<ProfitRecord> get(@PathVariable(value = "id") String id);
}
